const baseNPC = {


  update: function () {

  },



  onLayoutStart: function () {


  },



  OnNPCCreate: function (e,rt) {
   
    this.showName(e)



  },


  /**
   *  显示 Npc 名字
   * @param e
   */

      showName: function (e) {
        let npcinstanc =e.instance
        console.log(npcinstanc)

        let uiposx =npcinstanc.getImagePointX(1)
        let uiposy =npcinstanc.getImagePointY(1)

        let npcNameText = rt.objects.npc_name.createInstance("ui", uiposx, uiposy)
        npcNameText.text = npcinstanc.name = npcinstanc.instVars.NPC_NAME

        npcinstanc.addChild(npcNameText, {
          transformX: true,
          transformY: true,
          destroyWithParent: true
    })





  }

}

export default baseNPC;